package com.itheima.mall.service.umsService;

import com.itheima.mall.mapper.umsMapper.UmsMenuMapper;
import com.itheima.pojo.ums.UmsMenu;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

@DubboService
public class UmsMenuApiImpl implements UmsMenuApi {

    @Autowired
    private UmsMenuMapper umsMenuMapper;

    /**
     * 根据关联菜单IDS数组查询菜单数组
     * @param menuIds 菜单IDS数组
     * @return
     */
    @Override
    public ArrayList<UmsMenu> listMenu(ArrayList<Long> menuIds) {
        List<UmsMenu> umsMenus = umsMenuMapper.selectBatchIds(menuIds);
        return new ArrayList<UmsMenu>(umsMenus);
    }
}
